/* Panels */

.ui .panel {
	position: fixed;
	top: 30%;
	left: 30%;
	z-index: 99997;
	background-color: #fff;
	min-width: 220px;
	max-width: 360px;
	min-height: 100px;
	max-height: 460px;
	color: #383026;
	padding: 10px;
	box-shadow: 0 0 10px #000;
}

.ui .panel header {
	text-transform: uppercase;
	font-size: 18px;
	margin-bottom: 10px;
	cursor: move;
}

.ui .panel section,
.ui .panel .toolbar {
	font-size: 12px;
}

.ui .panel footer {
	border-top: 1px solid #ccc;
	padding-top: 10px;
	margin-top: 10px;
	clear: both;
}

.ui .panel .toolbar {
	margin-top: 10px;
	clear: both;
}

.ui .panel a {
	color: #444;
}

.ui .panel .toolbar .btn {
	border-radius: 3px;
	padding: 10px;
	text-transform: uppercase;
	text-align: center;
	display: block;
	cursor: pointer;
}

.ui .panel .toolbar .btn.iblock {
	display: inline-block;
	width: auto;
	margin-right: 4px;
}

.ui .panel section .buildings.left {
	width: 630px;
	float: left;
	position: relative;
}

.ui .panel section .buildings-info.right {
	display: none;
	float: left;
	width: 440px;
	margin-left: 10px;
}

.ui .panel fieldset {
	border: 1px solid #ccc;
	margin-bottom: 10px;
}

.ui .panel fieldset legend {
	padding: 0 10px;
}

.ui .panel .b-name {
	font-size: 26px;
	margin: 0 0 10px 0;
}

.ui .panel header a {
	width: 24px;
	height: 24px;
	display: block;
	float: right;
	cursor: pointer;
	margin-left: 8px;
}

.ui .panel footer a {
	width: 46px;
	height: 46px;
	display: inline-block;
	cursor: pointer;
	margin-right: 8px;
}

.ui .panel table {
	width: 100%;
	padding: 0;
	border-spacing: 1px;
	border-collapse: separate;
}

.ui .panel section dl,
.window dl {
	margin: 10px auto;
}

.ui .panel section dt,
.window dt {
	float: left;
	text-align: right;
	width: 45%;
	line-height: 20px;
	margin-bottom: 5px;
}

#panel-council section dd,
#panel-barracks section dd,
#panel-shipyard section dd {
	width: auto;
}

.ui .panel section dd,
.window dd {
	margin-left: 50%;
	line-height: 20px;
	margin-bottom: 5px;
/*	width: 140px; */
}

.ui .panel .section {
	padding: 10px;
}

.ui .panel .section {
	padding: 20px;
}

.ui .panel footer a {
	background-color: #BF9A76;
	border-radius: 10px;
	background-size: 32px 32px;
	background-position: center center;
}

.ui .panel footer a:hover {
	background-color: #9F7E5E;
}

.ui .panel .army-item-inc,
.ui .panel .army-item-dec,
.ui .panel .navy-item-inc,
.ui .panel .navy-item-dec {
	width: 20px;
	height: 20px;
	border: 1px solid #aaa;
	position: absolute;
}

.ui .panel .army-item-inc,
.ui .panel .navy-item-inc {
	left: 0;
	top: 0;
	background-color: #84da86;
	border-bottom-right-radius: 20px;
}

.ui .panel .army-item-dec,
.ui .panel .navy-item-dec {
	right: 0;
	top: 0;
	background-color: #da9a84;
	border-bottom-left-radius: 20px;
}

.ui .panel .army-recruiter,
.ui .panel .navy-recruiter {
	width: 630px;
	float: right;
	padding: 10px 0 0 0;
	max-height: 410px;
	overflow: auto;
}

.ui .panel .navy-item,
.ui .panel .army-item,
.ui .panel .storage-item {
	width: 75px;
	height: 65px;
	float: left;
	text-align: center;
	margin: 0 4px 4px 0;
	position: relative;
	box-shadow: inset 0 0 3px 0 rgba(20, 20, 20, 0.75);
	font-size: 11px;
}

.ui .panel .navy-item,
.ui .panel .army-item {
	width: 65px;
	height: 65px;
	font-size: 11px;
	position: relative;
}

.ui .panel .storage-item.small {
	width: 46px;
	height: 50px;
	font-size: 11px;
}

.ui .panel .storage-item .title {
	width: 100%;
	display: inline-block;
	width: 100%;
	padding-top: 4px;
}

.ui .panel .navy-item span.amount,
.ui .panel .army-item span.amount,
.ui .panel .storage-item span.amount {
	position: absolute;
	bottom: 0;
	right: 4px;
}

.ui .panel .navy-item img {
	margin: 8px auto 0 auto;
}

.ui .panel .army-item img {
	margin: 15px auto 0 auto;
}

.ui .panel .storage-item.small img {
	margin: 10px auto 0 auto;
	width: 20px;
}

.ui .panel .storage-item img {
	width: 32px;
}

.ui .panel .settlements-list {
	overflow: auto;
	max-height: 415px;
}

.ui .panel .column {
	width: 300px;
	float: left;
}

.ui aside .panel .column {
	float: none;
}

.ui .panel .column-small {
	width: 215px;
	float: left;
}

.ui .panel .column-full {
	width: 440px;
	clear: both;
}
.ui .panel .column-small:nth-child(3) {
	margin-left: 10px;
}

.ui .panel .column:last-of-type {
	margin-left: 10px;
}

.ui .panel fieldset select {
	width: 100%;
	border: 1px solid #aaa;
	padding: 4px 0;
}

.ui .panel fieldset p {
	margin: 10px 0 0 0;
}

.ui .panel .army-list,
.ui .panel .navy-list {
	float: left;
	width: 140px;
	padding: 10px 0 0 0;
}

.ui .panel .army-recruiter fieldset,
.ui .panel .navy-recruiter fieldset {
	display: block;
	float: left;
	margin: 0 10px 10px 0;
	width: 176px;
	position: relative;
}

.ui .panel .army-recruiter fieldset:nth-child(3),
.ui .panel .army-recruiter fieldset:nth-child(6),
.ui .panel .army-recruiter fieldset:nth-child(9),
.ui .panel .army-recruiter fieldset:nth-child(12),
.ui .panel .navy-recruiter fieldset:nth-child(3),
.ui .panel .navy-recruiter fieldset:nth-child(6),
.ui .panel .navy-recruiter fieldset:nth-child(9),
.ui .panel .navy-recruiter fieldset:nth-child(12) {
	margin-right:0 !important;
}

.ui .panel .army-recruiter fieldset > img,
.ui .panel .navy-recruiter fieldset > img {
	float: right;
	cursor: pointer;
	bottom: 10px;
	right: 10px;
	position: absolute;
}

.ui .panel .army-recruiter fieldset .info,
.ui .panel .navy-recruiter fieldset .info {
	float: right;
	width: 100px;
	margin-left: 10px;
}

.ui .panel .army-recruiter fieldset .cost,
.ui .panel .navy-recruiter fieldset .cost {
	float: left;
	width: 60px;
}

.ui .panel ul.advices {
	max-height: 300px;
	display: block;
	margin: 0;
	padding: 10px 0 0 0;
	overflow: auto;
}

.ui .panel ul.advices li {
	line-height: 30px;
	padding-left: 50px;
}

.ui .panel .hired-mercenaries-list {
	max-height: 370px;
	overflow: auto;
}

/* Sidebar */

.ui aside .panel {
	position: static;
	top: 0;
	left: 0;
	z-index: 99997;
	background-color: #ECD0B7;
	color: #444;
	padding: 10px;
	box-shadow: 0 0 0 transparent;
}

.ui aside .panel {
	width: 310px;
	max-height: 100%;
}

.ui aside .panel header {
	cursor: default;
}

.ui aside .panel footer {
	border: 0;
	margin: 0;
	padding: 0;
	position: fixed;
	bottom: 0;
}

.ui aside .panel section {
	overflow: scroll;
	height: calc(100% - 81px);
}

.ui aside .panel section p {
	text-align: justify;
}

.ui aside .panel .column img.building {
	width: 200px;
	margin: 0 auto;
	display: block;
}

.ui aside .panel .column {
	border-bottom: 1px solid #935F22;
	margin-bottom: 10px;
	width: 100% !important;
}

.ui aside .panel .column:last-of-type {
	margin-left: 0 !important;
}

/* Debug panel */

#panel-debug {
	max-width: 600px;
	width: 600px;
	height: auto;
	max-height: 400px;
}

#panel-debug .console {
	overflow: auto;
	max-height: 300px;
}

#panel-debug .console p {
	padding: 2px 5px;
	margin: 2px 0 0 0;
	line-height: 26px;
}

#panel-debug .console span {
	padding: 2px 6px;
	margin-right: 6px;
	border-radius: 6px;
}

#panel-debug .console span.error {
	background-color: #FF0000;
	color: #fff;
}

#panel-debug .console span.error-message {
	background-color: #aa4600;
	color: #fff;
}

#panel-debug .console span.log-message {
	color: #444;
	background-color: #efefef;
}

#panel-debug .console span.date {
	background-color: #54DBC5;
}

#panel-debug .console span.namespace {
	background-color: #D25C70;
	color: #fff;
}

#panel-debug .console span.namespace.game-ui {
	background-color: #BB86FC;
	color: #000;
}

#panel-debug .console span.namespace.game-world {
	background-color: #6638F0;
}

#panel-debug .console span.namespace.game-achievement {
	background-color: #7C7951;
}

#panel-debug .console span.namespace.game-event {
	background-color: #B0F566;
	color: #000;
}

#panel-debug textarea {
	width: 590px;
	height: 200px;
	padding: 5px;
	border: 0;
	box-shadow: inset 0 0 10px 0 rgba(20, 20, 20, 0.75);
	font-size: 10px;
	resize: none !important;
}

/* Help panel */

#panel-help {
	max-width: 800px;
	width: 800px;
	height: auto;
	max-height: 620px;
}

#panel-help fieldset {
	float: right;
	width: 200px;
	margin: 20px;
}

#panel-help fieldset li {
	font-size: 14px;
	line-height: 24px;
}

#panel-help .ui-tabs-panel {
	max-height: 550px;
	overflow: auto;
}

#panel-help .ui-tabs-panel p,
#panel-help .ui-tabs-panel li {
	font-size: 13px;
	line-height: 20px;
}

#panel-help img.help {
	width: 200px;
}

/* Worldmap panel */

#panel-world {
	max-width: 1184px;
	max-height: 700px;
	width: 1184px;
	height: 700px;
	box-sizing: border-box;
}

#panel-world .worldmap {
	width: 1164px;
	height: 640px;
	background-size: auto 100%;
	position: relative;
	overflow: hidden;
}

#panel-world .worldmap .place,
#panel-world .worldmap .settlement,
#panel-world .worldmap .troop {
	width: 40px;
	height: 40px;
	position: absolute;
	cursor: pointer;
}

#panel-world .w-t-p {
	opacity: 0.3;
}
/*
#panel-world .worldmap > img {
	pointer-events: none;
}
*/

/* World Trades panel */

#panel-trades {
	width: 800px;
	max-width: 800px;
	max-height: 500px;
	height: auto;
}

#panel-trades table.mercenaries td:nth-child(3) {
	width: 20%;
	text-align: right;
}

/* City Council panel */

#panel-council {
	width: 750px;
	max-width: 750px;
	height: auto;
	max-height: 540px;
}

#tab-production {
	overflow: auto;
	max-height: 460px;
}

/* City Storage panel */

#panel-storage {
	max-width: 790px;
	max-height: 700px;
	height: auto;
}

#panel-storage .storage-board {
	width: 560px;
	height: 100%;
	padding: 10px;
}

#panel-storage .total-storage, 
#panel-storage .used-storage {
	font-weight: bold;
}

/* City info panel */

#panel-settlement {
	width: 470px;
	max-width: 470px;
	max-height: 600px;
	height: auto;
}

#panel-settlement .ui-tabs-panel {
	padding: 0 10px;
}

#panel-building {
	max-height: 600px;
	max-width: 1400px;
}

/* City Builder panel */

#panel-buildings {
	max-width: 1190px;
	max-height: 630px;
	height: auto;
	width: 630px;
}

#panel-buildings .b-desc {
	margin-bottom: 10px;
}

#panel-buildings.expanded {
	width: 1080px !important;
}

#panel-buildings .building-item .building-info .btn {
	float: none;
	display: block;
	border: 0;
	background-color: #777;
	border-radius: 0;
	margin-top: 5px;
}

#panel-buildings .building-item {
	width: 150px;
	height: 150px;
	float: left;
	text-align: center;
	margin: 0 10px 10px 0;
	position: relative;
	box-shadow: inset 0 0 10px 0 rgba(0, 155, 70, 0.75);
	cursor: pointer;
	opacity: 0.8;
}

#panel-buildings .building-item:nth-child(4),
#panel-buildings .building-item:nth-child(8),
#panel-buildings .building-item:nth-child(12),
#panel-buildings .building-item:nth-child(16),
#panel-buildings .building-item:nth-child(20),
#panel-buildings .building-item:nth-child(24),
#panel-buildings .building-item:nth-child(28),
#panel-buildings .building-item:nth-child(32) {
	margin-right: 0;
}

#panel-buildings .building-item.active {
	opacity: 1 !important;
}

#panel-buildings .building-item .building-info {
	display: none;
	border-top: 1px solid #777;
}

#panel-buildings .building-item.disabled {
	box-shadow: inset 0 0 10px 0 rgba(186, 105, 74, 0.75);
}

#panel-buildings .building-item .title {
	padding-top: 6px;
	display: inline-block;
	font-size: 11px;
}

#panel-buildings .building-item img.building {
	width: 130px;
}

/* Other panels */

#panel-settlement .pact,
#panel-settlement .alliance,
#panel-settlement .war,
#panel-settlement .ceasefire {
	display: none;
}

#panel-new-army,
#panel-new-spy,
#panel-new-scout,
#panel-new-caravan {
	max-width: 640px;
	max-height: 600px;
}

#panel-academy {
	max-height: 700px;
	max-width: 620px;
	width: 620px;
}

#panel-academy .column-left {
	width: 310px;
	max-height: 400px;
	overflow: auto;
	margin-top:10px;
	float: left;
}

#panel-academy .column-right {
	width: 298px;
	float: left;
	margin-left: 10px;
}

#panel-academy .technology {
	cursor: pointer;
	float: left;
	margin: 4px;
}

#panel-academy .technology.selected {
	opacity: 1;
}

#panel-academy .technology.selected img {
	background-color: #BADEC6;
}

#panel-academy .technology.has img {
	background-color: #935F22;
}

#panel-academy .technology img {
	width: 46px;
	height: 46px;
	border-radius: 100%;
	padding: 10px;
	box-shadow: 0 0 4px 0 #935F22;
}

#panel-church h2,
#panel-embassy h2,
#panel-academy h2 {
	text-align: center;
}

#panel-tavern {
	max-height: 700px;
	max-width: 620px;
	width: 620px;
}

#panel-embassy {
	max-height: 600px;
	max-width: 720px;
	width: 720px;
}

#panel-church {
	max-height: 600px;
	max-width: 620px;
	width: 620px;
}

#panel-help .ui-tabs-panel li > a,
#panel-help p > a {
	text-decoration: underline;
}

#panel-buildings .bldg-tabs {
	padding: 10px 0 0 0;
	overflow: auto;
	max-height: 534px;
}

#panel-storage p {
	margin-top: 10px;
}

#panel-ranks {
	width: 300px;
}

#panel-ranks .ranks-list {
	height: 300px;
	overflow: auto;
}

#panel-church .religion-list {
	padding: 20px;
}

#panel-church .religion-list .religion:nth-child(4), 
#panel-church .religion-list .religion:nth-child(8) {
	margin-right: 0;
}

#panel-church .religion-list .religion {
	border-radius: 100%;
	width: 128px;
	height: 128px;
	margin: 0 10px 10px 0;
	float: left;
	box-shadow: inset 0 0 8px 0 rgba(0, 0, 0, 0.75);
	position: relative;
	cursor: pointer;
}

#panel-church .religion-list .religion.selected {
	background-color: #ddd;
}

#panel-church .religion-list .religion span {
	position: absolute;
	bottom: 0;
	padding-bottom: 20px;
	width: 128px;
	text-align: center;
}

#panel-new-caravan .caravan-resources {
	overflow: auto;
	max-height: 200px;
}

#panel-tavern .hero-list {
	width: 70px;
	padding: 10px 20px;
}

#panel-tavern .hero-info {
	width: 300px;
	padding: 20px;
}

#panel-tavern .hero-items {
	width: 160px;
	padding: 0;
}

#panel-tavern .hero-items .slot {
	width: 46px;
	height: 50px;
	font-size: 11px;
	float: left;
	text-align: center;
	margin: 0 4px 4px 0;
	position: relative;
	box-shadow: inset 0 0 3px 0 rgba(20, 20, 20, 0.75);
	font-size: 34px;
}

#panel-tavern .hero-info h3 {
	margin: 0 0 10px 0;
}

#panel-campaign {
	min-width: 400px;
}

#panel-settlement footer a.attack,
#panel-settlement footer a.caravan,
#panel-settlement footer a.spy,
#panel-settlement footer a.alliance,
#panel-settlement footer a.pact,
#panel-settlement footer a.join,
#panel-settlement footer a.war,
#panel-settlement footer a.ceasefire {
	display: none;
}

#panel-place {
	width: 450px;
	max-width: 450px;
	max-height: 600px;
	height: auto;
}

#panel-barracks,
#panel-shipyard {
	width: 780px;
	max-width: 780px;
	height: auto;
	max-height: 600px;
}
